home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0077_Disk-detecting routine.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-24  |  628b  |  33 lines

  1. {
  2.  -=> Quoting Christian Proehl to All <=-
  3.  
  4.  CP> Subject: Disk-detecting routines without DOS (and
  5.  
  6.  CP> Muelheim, den 20.05.94
  7.  
  8.  CP> Hello!
  9.  
  10.  CP> I have problem I don't know how to solve it.
  11.  CP> Perhaps someone around the world knows more, please help me!
  12.  
  13.  use the bios call
  14.  
  15.   function $16, int $13
  16. }
  17.  
  18. function DiskChange( DriveNmber :Byte) :Boolean;
  19. Begin
  20.  ASm
  21.    Mov AH, $16
  22.    Mov DL, driveNmber
  23.    Int $13
  24.    Mov AL,AH;  { use AL & AH as a Return Value }
  25.  End;
  26. End;
  27.  
  28. Begin
  29.   If DiskChange(0) then Write(' Disk has Changed in Drive ''A'' ')
  30.    Else
  31.      Write(' Disk Has changed ');
  32. end.
  33.